package com.handinfo.engine.resource;

import com.handinfo.util.Tools;

/**
 * @author Xia Mingwei
 * @version 1.0
 */
public class FileSerialize extends ResourceSerialize
{

	public FileSerialize() throws InstantiationException
	{
		/**
		 * 判断系统是否支持FC
		 */
		String version = System
				.getProperty("microedition.io.file.FileConnection.version");
		if (version == null) {
			Tools.debugPrintln("cannot control fileSystem!");
			throw new InstantiationException("cannot control fileSystem!");
		}
		else {
			Tools.debugPrintln("version: " + version);
		}
	}

	public boolean openSerialize(String name, boolean needCreate,
			boolean onlyOpenCatalog)
	{
		return true;
	}

	public boolean closeSerialize()
	{
		return true;
	}

	public byte[] readResource(ResHead head)
	{
		return null;
	}

	public void writeResource(ResHead head, byte[] data)
	{

	}

	public void updateLastUsedFlag(ResHead head)
	{

	}

	public boolean exist(ResHead head)
	{
		return false;
	}

	public void clear()
	{
	}
}
